home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Resources
/
Chat & Communication
/
Digsby build 37
/
digsby_setup.exe
/
lib
/
msn
/
p
/
MSNPSwitchboard.pyo
(
.txt
)
< prev
Wrap
Python Compiled Bytecode
|
2008-10-13
|
4KB
|
96 lines
# Source Generated with Decompyle++
# File: in.pyo (Python 2.5)
from util import StateMachine, Events
from msn import CommandProcessor
import logging
log = logging.getLogger('msn.p.sb')
class MSNSwitchboard(Events.EventMixin, CommandProcessor):
events = Events.EventMixin.events | set(('on_buddy_join', 'on_buddy_leave', 'on_buddy_timeout', 'on_conn_success', 'on_authenticate', 'disconnect', 'contact_alias', 'needs_auth', 'recv_error', 'recv_action', 'transport_error'))
def __init__(self, SckCls_or_sck, to_invite = (), server = ('', 0), cookie = None, sessionid = None):
Events.EventMixin.__init__(self)
CommandProcessor.__init__(self, log)
self._cookie = cookie
self._session = sessionid
self.has_connected = False
self.principals = []
if type(SckCls_or_sck) is type:
self.socket = None
self._socktype = SckCls_or_sck
self._server = server
else:
self.socket = SckCls_or_sck
self._socktype = type(self.socket)
self._server = self.socket.getpeername()
self._p2p_transport = None
self.bind('on_conn_success', (lambda this: setattr(this, 'has_connected', True)))
def _closed(self):
if not self.has_connected and not (self.socket):
pass
return self.socket._closed
_closed = property(_closed)
def self_buddy(self):
return NotImplemented
self_buddy = property(self_buddy)
def invite(self, bname):
return NotImplemented
def send_text_message(self, message, callback):
return NotImplemented
def on_send_message(self, msg):
return NotImplemented
def leave(self):
return NotImplemented
def send(self, msg):
return NotImplemented
def connect(self):
return NotImplemented
def disconnect(self):
return NotImplemented
def close_transport(self):
return NotImplemented
def on_conn_fail(self):
return NotImplemented
def on_conn_success(self):
return NotImplemented
def on_complete_auth(self):
return NotImplemented
def close_connection(self):
return NotImplemented
def on_error(self, msg):
CommandProcessor.on_error(self, msg)
self.event('recv_error', msg)